package com.dldata.devtools30.cfg;

import com.dldata.devtools30.utils.StringUtil;

/**
 * Created by Administrator on 2018/5/11.
 */
public class ApplicationHome {

    public static String getApplicationHome(){
        String applicationHome = System.getProperty("application_home");
        String application_home = applicationHome == null ? System.getenv("application_home") : applicationHome;
        application_home=StringUtil.isEmptyOrLength0(application_home)?System.getProperty("user.dir"):application_home;
        return application_home;
    }

    public static String getApplicationLog(){
        return getApplicationHome()+"/logs/";
    }

    public static String getApplicationConfig(){
        return getApplicationHome()+"/config/";
    }

    public static String getApplicationLogConfigFile(){
        return getApplicationHome()+"/config/logback.xml";
    }

}
